module.exports = class Response {
	constructor(code, msg, result) {
		this.code = code || '000'
		this.message = msg || ''
		this.result = result || {}
		if (typeof result == 'string')
			this.result = {
				[result]: result,
			}
	}

	setCode(msg) {
		this.code = code || '000'
	}

	setMessage(msg) {
		this.message = msg || ''
	}

	setResult(result) {
		this.result = result || {}
		if (typeof result == 'string')
			this.result = {
				[result]: result,
			}
	}
}